<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>解构表达式</title>
</head>
<body>
    <script>
        //数组的结构
        let arr = [1,2,3,4,5];
        const [a,b,c,d,e] = arr;
        console.log(a);
        console.log(b);
        console.log(c);
        console.log(d);
        console.log(e);

        //对象的解构
        let perosn ={
            name:"张三丰",
            age:"123"
        };
        // let {name,age}=perosn;
        const {name,age}=perosn;
        console.log(name);
        console.log(age);
    </script>
</body>
</html>